function post(params, defs) {
        let def = {
            respCall: function(xhr){
                console.log(xhr.responseText);
            }
        }
        let opts = Object.assign({}, def, defs || {}, params || {});
        if(!opts.url && !opts.baseUrl){
            throw new Error("配置缺少[url | baseUrl]选项");
        }
        var xhr = new XMLHttpRequest();
        xhr.open('POST', opts.url || opts.baseUrl + opts.path, true);
        xhr.onreadystatechange = function() {
            // 请求成功，处理响应数据
            if (xhr.readyState === 4 && xhr.status === 200) {
                opts.respCall && opts.respCall(xhr);
            }
        };
        if(opts.headers && !Array.isArray(opts.headers)) {
            for(let key in opts.headers) {
                xhr.setRequestHeader(key, opts.headers[key]);
            }
        }
        if(opts.cors){
            xhr.setRequestHeader("Access-Control-Allow-Origin", "*");
        }
        if(opts.body){
            xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
            if(typeof(opts.body) === 'string'){
                xhr.send(opts.body);
            } else if(typeof(opts.body) === 'object'){
                let body = JSON.stringify(opts.body);
                xhr.send(body);
            } else {
                throw new Error("body内容不传，或类型为string|object");
            }
        } else {
            xhr.send();
        }
    }